﻿@model Susha.Models.Pages.GuestPage

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section scripts{
    @Scripts.Render("/Scripts/common/admin.js")
    @Scripts.Render("/Scripts/common/user.js")
    @Scripts.Render("/Scripts/jquery-1.8.2.min.js")
}

<h1>Управление гостевой книгой</h1>
<div class="guest-container">
@foreach(Susha.Models.GuestComment comment in Model.Comments)
{
    <div class="guest-comment">
        <b>@comment.UserName:</b> @comment.UserComment<br />
        @Html.TextBox(String.Format("comment-{0}", comment.Id), null, new { Value=comment.AdminComment, onblur=String.Format("CommentGuest({0})", comment.Id), @class="in-container-admin" })
    </div>
} 
</div>
<div class="btn-panel">
    @if (Model.Prev)
    {
        @Html.ActionLink("Prev", "Index", "Guest", new { id = Model.PageNumber - 1 }, new { @class="btn btn-green" })
    }
    @if (Model.Next)
    {
        @Html.ActionLink("Next", "Index", "Guest", new { id = Model.PageNumber + 1 }, new { @class="btn btn-black" })
    }

</div>